package com.edu.schoolforum.utils;

import lombok.Data;
import lombok.ToString;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author tao
 * @date 2021/8/7 15:52
 */
@Data
@ToString
public class ImgCommonResult {
    private static Logger logger = LoggerFactory.getLogger(ImgCommonResult.class);
    int errno;
    Object data;
    private ImgCommonResult(int errno,
                            Object data){
        this.errno=errno;
        this.data=data;
    }

    /**
     * 成功
     */
    public static ImgCommonResult success(Object data){
        return new ImgCommonResult(0,data);
    }

    /**
     * 失败
     */
    public static ImgCommonResult fail(){
        return new ImgCommonResult(1,null);
    }



}
